﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WyUnity.Utility.IOC
{
	/// <summary>
	/// 对象容器
	/// </summary>
	public interface IObjectContainer
	{
        object Container { get; }

        T Get<T>();
        T Get<T>(string key);
        object Get(Type type);

        void RegistSingleton<T>(string key, T obj);
        void Regist<T>(string key) where T : class;
        void Regist<T>() where T : class;
        void Regist<I, T>(Type[] interceptors)
            where T : class,I
            where I : class;

        void Remove<T>(string key);
        void Remove<T>();

        T[] GetAll<T>();
	}
}
